package com.example.fashion.android.home;

import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.widget.LinearLayout;

import com.example.fashion.android.MultiMedia.activity.Camera2Activity;
import com.example.fashion.android.MultiMedia.activity.CameraActivity;
import com.example.fashion.android.MultiMedia.activity.CameraActivity2;
import com.example.fashion.android.base.BaseActivity.BaseActivity;
import com.example.fashion.android.MultiMedia.activity.NotifyActivity;
import com.example.fashion.android.globar.Constant;
import com.example.fashion.android.util.LayoutUtil;

/**
 * 多媒体界面
 */
public class MediaActivity extends BaseActivity implements LayoutUtil.ClickCallBack{
    //界面布局
    LinearLayout mRootLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //创建一个线性布局
        mRootLayout = LayoutUtil.getLinearLayout(this,LinearLayout.VERTICAL, Gravity.CENTER);
        setContentView(mRootLayout);
    }

    @Override
    public void initView() {
        //显示标题栏
        setSystemTitleName("多媒体");

    }

    @Override
    public void initData() {
        //添加功能列表
        LayoutUtil.addFunctionList(this, mRootLayout, Constant.MEDIA_RESOURCE_ID, this);
    }

    @Override
    protected void clear() {

    }

    /**
     * 功能列表的点击事件
     * @param tag
     */
    @Override
    public void onClickListener(int tag) {
        switch (tag){
            case 0:    //音频
                break;
            case 1:    //视屏
                break;
            case 2:     //照相机
//                startActivity(new Intent(getApplicationContext(),CameraActivity.class));
//                startActivity(new Intent(getApplicationContext(),Camera2Activity.class));
                startActivity(new Intent(getApplicationContext(),CameraActivity2.class));
                break;
            case 3:     //蓝牙
                break;
            case 4:     //通知
                startActivity(new Intent(getApplicationContext(),NotifyActivity.class));
                break;
            default:
                break;
        }
    }
}
